﻿/***********************************************************************
 * <copyright file="IAutoNumber.cs" company="BUCA JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   LinhMC
 * Email:    linhmc@buca.vn
 * Website:
 * Create Date: Tuesday, October 22, 2013
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System.Collections.Generic;
using BusinessObjects.BussinessDictionary;

namespace DataObjects.StandartInterfaces.Dictionary
{
    /// <summary>
    /// Defines methods to access AutoNumber
    /// </summary>
    /// <remarks>
    /// This is a database-independent interface. Implementations are database specific
    /// </remarks>
    public interface IAutoNumberDao 
    {
        /// <summary>
        /// Gets the paged.
        /// </summary>
        /// <param name="unitId">The unit identifier.</param>
        /// <param name="currentPage">The current page.</param>
        /// <returns></returns>
        List<AutoNumber> GetPaged(int unitId, int currentPage);

        AutoNumber GetAutoNumberByRefType(int unitId, int refType);
        /// <summary>
        /// Gets the size of the page.
        /// </summary>
        /// <param name="unitId">The unit identifier.</param>
        
        /// <returns></returns>
        int GetPageSize(int unitId);

        

          /// <summary>
        /// Gets the autoNumbers by unit.
        /// </summary>
        /// <param name="autoNumberId">The unit identifier.</param>
        /// <returns></returns>
        AutoNumber GetAutoNumber(int autoNumberId); 

        
        /// <summary>
        /// Inserts the autoNumber.
        /// </summary>
        /// <param name="autoNumber">The autoNumber.</param>
        string InsertAutoNumber(AutoNumber autoNumber);

        /// <summary>
        /// Updates the autoNumber.
        /// </summary>
        /// <param name="autoNumber">The autoNumber.</param>
        string UpdateAutoNumber(AutoNumber autoNumber);

        /// <summary>
        /// Deletes the autoNumber.
        /// </summary>
        /// <param name="autoNumber">The autoNumber.</param>
        string DeleteAutoNumber(AutoNumber autoNumber);
    }
}
